<div class="quanhuyens index">
    <h2><?php __('Quản lí các Quận/Huyện thuộc '); echo $tinhtp['Tinhtp']['tentinhtp'];?></h2>
    <h4 align="right"> 
        <?php
            echo $this->Html->link(__('THÊM QUẬN HUYỆN', true), array('action' => 'addtheotinhtp', $tinhtp['Tinhtp']['id']));
        ?> 
    </h4>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('STT');?></th>
			<th><?php echo $this->Paginator->sort('TÊN QUẬN/HUYỆN','tenquanhuyen');?></th>
			<th><?php echo $this->Paginator->sort('GHI CHÚ','ghichu');?></th>
			<th class="actions"><?php __('THAO TÁC');?></th>
	</tr>
	<?php
	$i = 0;
    //Số thứ tự
    $stt = 1;
	foreach ($quanhuyens as $quanhuyen):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $stt; ?>&nbsp;</td>
		<td><?php echo $quanhuyen['Quanhuyen']['tenquanhuyen']; ?>&nbsp;</td>
		<td><?php echo $quanhuyen['Quanhuyen']['ghichu']; ?>&nbsp;</td>
		<td class="actions">
			<!-- <?php echo $this->Html->link(__('View', true), array('action' => 'view', $quanhuyen['Quanhuyen']['id'])); ?> -->
			<?php echo $this->Html->link(__('Sửa', true), array('action' => 'edittheotinhtp', $quanhuyen['Quanhuyen']['id'])); ?>
			<?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $quanhuyen['Quanhuyen']['id']), null, sprintf(__('Bạn có chắc muỗn xóa %s?', true), $quanhuyen['Quanhuyen']['tenquanhuyen'])); ?>
            <?php echo $this->Html->link(__('Xem Phường/Xã', true), array('controller'=>'phuongxas','action' => 'xemphuongxa', $quanhuyen['Quanhuyen']['id'])); ?>
    	</td>
	</tr>
    <?php 
        $stt += 1;   
        endforeach; 
    ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiển thị %current% mẫu tin trong tổng số %count% mẫu tin, bắt đầu tại %start%, và kết thúc tại %end%', true)
	));
	?>	</p>

	<div class="paging">
        <?php echo $paginator->first(__('Trang đầu'));?>
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>  
        <?php echo $this->Paginator->last(__('Trang cuối'));?>
	</div>
    <h4 align="right"> 
        <?php
            echo $this->Html->link(__('Trở về Tỉnh/TP', true), array('controller' => 'tinhtps', 'action' => 'index')); 
        ?> 
    </h4>
</div>

<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Quanhuyen', true), array('action' => 'add')); ?></li>
		<li><?php echo $this->Html->link(__('List Tinhtps', true), array('controller' => 'tinhtps', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Tinhtp', true), array('controller' => 'tinhtps', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Phuongxas', true), array('controller' => 'phuongxas', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Phuongxa', true), array('controller' => 'phuongxas', 'action' => 'add')); ?> </li>
	</ul>
</div>